<?php
include_once 'CF_ProcessorBase.php';


class CF_ProcessorBaseTest extends CF_ProcessorBase {



	var $ModelName;

	function CalculateModelName(){
		$this->ModelName = Doctrine_Inflector::classify($this->maintable);
		
	}


	

/*
Define the following
		$run_mode = 'process_' . $mode;
		$pre_mode = 'on_pre_' . $mode;
		$post_mode = 'on_post_' . $mode;
		$after_mode = 'after_' . $mode;
		$error_mode = 'on_error_' . $mode;
		$key_set_mode = 'get_keys_' . $mode;
		$new_set_mode = 'get_new_' . $mode;
		$old_set_mode = 'get_old_' . $mode;
		$ctl_set_mode = 'get_ctl_' . $mode;			

	
		
		*/

/*
Options for variable input (methods, use $this->):
Single Value, through name and value parameter: GetSingleValue($varParam = 'var',$valParam = 'value')
url parameters:  GetReqParamsByList($list,[<prefix>],[<require all in list :true,false]>
Packed Parameters, one set: GetPackedParamValues(<VariableNameParameter>, <PackedValueParameter>)
Packed Parameters, multiple sets: GetPackedParamValues(<VariableNameParameter>, <PackedSetsParameter>)

Packed parameters values delimited by $this->value_delimiter
Packed parameter sets delimited by $this->set_delimiter

Functions for limiting value sets:
FilterByList(&$TargetList, $LimitList)
CheckArrayComplete($TargetList, $LimitList)

Fieldspec info:
keys list in $this->$keyvarslist
columns list in $this->colvarslist


*/

//Operation: test
		
function get_keys_test(){
	$this->keyvalues = $this->GetPackedParamValues('cols', 'stuff');
	
}		
	
function get_new_test(){
	$this->newvalues = $this->GetPackedParamSets('cols', 'sets');
}

function get_old_test(){
	$list = array('var1','var2','var3');
	$this->oldvalues = $this->GetReqParamsByList($list);
}

function process_test(){
	print "<br />Test output for 'test' process < br/>\n";
	echo "<pre>";
	print_r($this->keyvalues);
	print_r($this->newvalues);
	print_r($this->oldvalues);
	echo "</pre>";
	$this->status = "OK";
}

function after_test(){
	print "THE STATUS = " . $this->status;
}


}

?>